Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-35955 Wrong result for UPDATE ... ORDER BY LIMIT using tmp.table #3804

Open
wants to merge 1 commit into
base: 10.11
Choose a base branch
from

Conversation

DaveGosselin-MariaDB
Copy link
Member

Queries of the form

  UPDATE t1.*, t2.* ORDER BY t1.col1, t2.col2, ... LIMIT N;

now correctly sort first by t1.col, then by t2.col2. Previously, such queries would, when more than one ORDER BY column was specified, incorrectly sort the columns from the input tables; as an example, when two ORDER BY columns were specified, the sorting would first be by t2.col2 and then by t1.col1, updating more rows from the first table than the second.

Queries of the form
  UPDATE t1.*, t2.* ORDER BY t1.col1, t2.col2, ... LIMIT N;
now correctly sort first by t1.col, then by t2.col2.  Previously,
such queries would, when more than one ORDER BY column was specified,
incorrectly sort the columns from the input tables; as an example, when
two ORDER BY columns were specified, the sorting would first be by t2.col2
and then by t1.col1, updating more rows from the first table than the
second.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant